import Vue from 'vue'
import Vuex from 'vuex';
import svcInvoke from '@/common/svcinvoke.js';
import trade from '@/common/store/trade.js';
Vue.use(Vuex)

export default new Vuex.Store({
  modules: {
    trade
  },
  state: {
    userInfo: {},
    loginbrn: '',
    // 控制能否登陆
    tablistli: null,
    // 交易底部时间控制器
    timelist: null,
    // 时间控制器
    checkselect: null,//是否是自选
    tablistcode:null,//当前页面的code码
  },
  mutations: {
    set(state, payload) {
      for (var key in payload) {
        if (payload.hasOwnProperty(key)) state[key] = payload[key]
      }
    },
    del(state, key) {
      delete state[key]
    },
    reset(state) {
      for (let key in state) {
        delete state[key]
      }
    },
  },
  actions: {}
})
